package controllers;

import java.io.IOException;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.googlecode.objectify.Objectify;
import com.googlecode.objectify.ObjectifyService;
import com.googlecode.objectify.Query;

import models.DemoModel;
import models.Domain;

public class Demo extends HttpServlet {
	public void doGet(HttpServletRequest request, HttpServletResponse response)
		throws IOException {
		
		int standarRank = 500000;
		//Save data
		try {
			ObjectifyService.register(Domain.class);
		} catch (Exception e) {
			// TODO: handle exception
		}
		
		Objectify ofy = ObjectifyService.begin();
		Query<Domain> q = ofy.query(Domain.class).filter("alexaGlobeRank <>", 0);
		
		for (Domain d: q) {
		    System.out.println(d.getName());
		}
	}
}
